﻿@model IEnumerable<GameSchool.Models.Assignment>

@{
    ViewBag.Title = "Index.cshtml";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index.cshtml</h2>

<p>
    @Html.ActionLink("Create New", "CreateAssignment")
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Description
        </th>
        <th>
            IsMandatory
        </th>
        <th>
            Points
        </th>
        <th>
            Active
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsMandatory)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Points)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Active)
        </td>
        <td>
            @Html.ActionLink("Edit", "EditAssignment", new { id=item.AssignmentId }) |
            @Html.ActionLink("Details", "Details", new { id=item.AssignmentId }) |
        </td>
    </tr>
}

</table>
